<template>
  <div class="page-container">
    <!--工具栏-->
    <div class="toolbar" style="float:left;padding-top:10px;padding-left:15px;">
      <el-form :inline="true" :model="filters" :size="size">
        <el-row>
          <el-form-item>
            <el-input
              v-model="filters.number"
              placeholder="选择商家"
              style="width: 200px;"
              readonly
              @focus="showShop"
            ></el-input>
          </el-form-item>

          <el-form-item>
            <el-input readonly v-model="filters.number" placeholder="单号" style="width: 200px;"></el-input>
          </el-form-item>

          <el-form-item>
            <el-select v-model="filters.status" style="width: 200px;" placeholder="审核状态">
              <el-option label="--选择--" value="0"></el-option>
              <el-option label="待提交" value="0"></el-option>
              <el-option label="待审核" value="1"></el-option>
              <el-option label="审核通过" value="2"></el-option>
              <el-option label="审核驳回" value="3"></el-option>
              <el-option label="已取消" value="3"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item>
            <el-select v-model="filters.status" style="width: 200px;" placeholder="交易币别">
              <el-option label="CNY" value="0"></el-option>
              <el-option label="AUD" value="1"></el-option>
              <el-option label="USD" value="2"></el-option>
              <el-option label="GBP" value="3"></el-option>
            </el-select>
          </el-form-item>

          <el-row>
            <div style="float:right">
              <el-form-item>
                <kt-button
                  icon="fa fa-search"
                  :label="$t('action.search')"
                  type="primary"
                  @click="findPage(null)"
                />
              </el-form-item>
              <el-form-item>
                <kt-button
                  icon="fa fa-refresh" :label="$t('action.reset')"
                  type="primary"
                  @click="resetForm('filters')"
                />
              </el-form-item>

              <el-form-item>
                <kt-button label="导出" type="primary" @click="exInfo" />
              </el-form-item>

              <el-form-item>
                <kt-button label="新建价格调整" type="primary" @click="addJust" />
              </el-form-item> 
            </div>
          </el-row>
        </el-row>
      </el-form>
    </div>
    <!--样式优化时注释，后期需要时放开-->
    <!-- <div class="tab-container">
      <el-alert
        :closable="false"
        style="background-color: #ffffff;color: #ffffff;"
        title
        type="success"
      />
      <el-tabs v-model="activeNames" style="margin-top:15px;" type="border-card">
        <el-tab-pane
          v-for="item in tabMapOptions"
          :key="item.key"
          :label="item.label"
          :name="item.key"
        >
          <keep-alive>
            <tab-pane v-if="activeNames==item.key" :type="item.key" />
          </keep-alive>
        </el-tab-pane>
      </el-tabs>
    </div> -->
    <div class="toolbar" style="float:right;padding-top:10px;padding-right:15px;">
      <el-form :inline="true" :size="size">
        <el-form-item>
          <el-button-group>
            <el-tooltip content="刷新" placement="top">
              <el-button icon="fa fa-refresh" @click="findPage(null)"></el-button>
            </el-tooltip>
            <el-tooltip content="列显示" placement="top">
              <el-button icon="fa fa-filter" @click="displayFilterColumnsDialog"></el-button>
            </el-tooltip>
            <el-tooltip content="导出" placement="top">
              <el-button icon="fa fa-file-excel-o" @click="downloadExcel" id="downloadExcel"></el-button>
            </el-tooltip>
          </el-button-group>
        </el-form-item>
      </el-form>
      <!--表格显示列界面-->
      <table-column-filter-dialog
        ref="tableColumnFilterDialog"
        :columns="columns"
        @handleFilterColumns="handleFilterColumns"
      ></table-column-filter-dialog>
    </div>
    <!--表格内容栏-->
    <cy-table
      :height="350"
      ref="CyTable"
      :data="pageResult"
      :columns="filterColumns"
      :showOperation="false"
      @selectionChange="selectionChange"
      @findPage="findPage"
      @handleEdit="handleEdit"
      @handleDelete="handleDelete"
    ></cy-table>

    <el-dialog
      title="选择商家"
      :visible.sync="showModel"
      width="45%"
      height="100%"
      :model="dataForm"
      label-width="80px"
      ref="dataForm"
      :size="size"
      label-position="right"
    >
      <el-form
        style="text-align:left"
        :model="dataForm"
        label-width="80px"
        ref="dataForm"
        :size="size"
        label-position="right"
      >
        <el-row>
          <div style="text-align:center">
            <el-form-item label="商家编码" prop="money" style="float:left;margin-left:90px">
              <el-input v-model="dataForm.money" auto-complete="off" width="20%"></el-input>
            </el-form-item>

            <el-form-item label="商家名称" prop="money" style="float:left;margin-left:90px">
              <el-input v-model="dataForm.money" auto-complete="off" width="20%"></el-input>
            </el-form-item>
          </div>
        </el-row>

        <div style="text-align:center">
          <el-form-item>
            <kt-button
              icon="fa fa-search"
              :label="$t('action.search')"
              type="primary"
              @click="findPage(null)"
            />
            <kt-button
              icon="fa fa-refresh" :label="$t('action.reset')"
              type="primary"
              @click="resetForm('filters')"
            />
          </el-form-item>
        </div>

        <el-table :data="tableData" border style="width: 100%" :visible.sync="showTable">
          <el-table-column prop="number" label="商家编码" width="280"></el-table-column>
          <el-table-column prop="name" label="商家名称" width="280"></el-table-column>
          <el-table-column prop="type" label="商家类型"></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align:right">
        <el-button @click="cancels">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 店铺table -->
    <el-dialog
      title="选择店铺"
      :visible.sync="showModel1"
      width="45%"
      height="100%"
      :model="dataForm"
      label-width="80px"
      ref="dataForm"
      :size="size"
      label-position="right"
    >
      <el-form
        style="text-align:left"
        :model="dataForm"
        label-width="80px"
        ref="dataForm"
        :size="size"
        label-position="right"
      >
        <el-row>
          <div style="text-align:center">
            <el-form-item label="店铺编码" prop="money" style="float:left;margin-left:90px">
              <el-input v-model="dataForm.money" auto-complete="off" width="20%"></el-input>
            </el-form-item>

            <el-form-item label="店铺名称" prop="money" style="float:left;margin-left:90px">
              <el-input v-model="dataForm.money" auto-complete="off" width="20%"></el-input>
            </el-form-item>
          </div>
        </el-row>

        <div style="text-align:center">
          <el-form-item>
            <kt-button
              icon="fa fa-search"
              :label="$t('action.search')"
              type="primary"
              @click="findPage(null)"
            />
            <kt-button
              icon="fa fa-refresh" :label="$t('action.reset')"
              type="primary"
              @click="resetForm('filters')"
            />
          </el-form-item>
        </div>

        <el-table :data="tableData1" border style="width: 100%" :visible.sync="showTable1">
          <el-table-column prop="checks" type="selection"></el-table-column>
          <el-table-column prop="name" label="商家名称" width="200"></el-table-column>
          <el-table-column prop="number" label="店铺编码" width="200"></el-table-column>
          <el-table-column prop="storename" label="店铺名称" width="200"></el-table-column>
          <el-table-column prop="storetype" label="店铺类型" width="200"></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align:right">
        <el-button @click="cancels2">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 供应商table -->
    <el-dialog
      title="选择供应商"
      :visible.sync="showModel2"
      width="45%"
      height="100%"
      :model="dataForm"
      label-width="80px"
      ref="dataForm"
      :size="size"
      label-position="right"
    >
      <el-form
        style="text-align:left"
        :model="dataForm"
        label-width="80px"
        ref="dataForm"
        :size="size"
        label-position="right"
      >
        <el-row>
          <div style="text-align:center">
            <el-form-item label="供应商编码" prop="money" style="float:left;margin-left:90px">
              <el-input v-model="dataForm.money" auto-complete="off" width="20%"></el-input>
            </el-form-item>

            <el-form-item label="供应商名称" prop="money" style="float:left;margin-left:90px">
              <el-input v-model="dataForm.money" auto-complete="off" width="20%"></el-input>
            </el-form-item>
          </div>
        </el-row>

        <div style="text-align:center">
          <el-form-item>
            <kt-button
              icon="fa fa-search"
              :label="$t('action.search')"
              type="primary"
              @click="findPage(null)"
            />
            <kt-button
              icon="fa fa-refresh" :label="$t('action.reset')"
              type="primary"
              @click="resetForm('filters')"
            />
          </el-form-item>
        </div>

        <el-table :data="tableData2" border style="width: 100%" :visible.sync="showTable2">
          <el-table-column prop="checks" type="selection"></el-table-column>
          <el-table-column prop="number" label="供应商编码" width="400"></el-table-column>
          <el-table-column prop="name" label="供应商名称" width="400"></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align:right">
        <el-button @click="cancels3">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 调价单编辑 -->
    <el-dialog
      title="编辑调价单"
      :visible.sync="showAdjustModel"
      width="80%"
      height="100%"
      label-width="80px"
      label-position="right"
    >
      <el-form style="text-align:left" label-width="80px" label-position="right">
        <el-row>
          <div>
            <el-row :gutter="24">
              <el-col :span="4">
                <div class="grid-content" style="text-align:right">
                  <label>调价单号</label>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:left;width:100%">
                  <el-span size="mini" disabled="disabled">TJ1912270004769657</el-span>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:right">
                  <label>状态</label>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:left;width:100%">
                  <el-span size="mini" disabled="disabled">待提交</el-span>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:right">
                  <label>创建人</label>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:left;width:100%">
                  <el-span size="mini" disabled="disabled">merchant</el-span>
                </div>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="4">
                <div class="grid-content" style="text-align:right">
                  <label>创建时间</label>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:left;width:100%">
                  <el-span size="mini" disabled="disabled">2019-12-27 09:50:18</el-span>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:right">
                  <label>操作人用户名</label>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:left;width:100%">
                  <el-span size="mini" disabled="disabled">merchant</el-span>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:right">
                  <label>最后更新时间</label>
                </div>
              </el-col>
              <el-col :span="4">
                <div class="grid-content" style="text-align:left;width:100%">
                  <el-span size="mini" disabled="disabled">2019-12-27 09:50:18</el-span>
                </div>
              </el-col>
            </el-row>
          </div>
        </el-row>

        <el-table :data="adjustTable" border style="width: 100%" :visible.sync="showAdjustTable">
          <el-table-column prop="checks" type="selection"></el-table-column>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button size="mini" @click="removeTable(scope.$index, scope.row)">删除</el-button>
            </template>
          </el-table-column>
          <el-table-column prop="contractCode" label="原合同编号"></el-table-column>
          <el-table-column prop="supplierCode" label="供应商编码"></el-table-column>
          <el-table-column prop="supplierName" label="供应商名称"></el-table-column>
          <el-table-column prop="storeCode" label="店铺编码"></el-table-column>
          <el-table-column prop="storeName" label="店铺名称"></el-table-column>

          <el-table-column prop="mpCode" label="商品编码"></el-table-column>
          <el-table-column prop="mpBarcode" label="商品条码"></el-table-column>
          <el-table-column prop="mpName" label="商品名称"></el-table-column>
          <el-table-column prop="mpBrandCode" label="商品规格"></el-table-column>
          <el-table-column prop="mpMeasurementUnit" label="主计量单位"></el-table-column>
          <el-table-column prop="mpPurchaseUnit" label="采购单位"></el-table-column>
          <el-table-column prop="mpPurchaseUnitRate" label="转换率"></el-table-column>
          <el-table-column prop="currencyCode" label="交易币别"></el-table-column>
          <el-table-column prop="newCostWithTaxUnitAmt" label="含税采购价"></el-table-column>
          <el-table-column prop="newCostTaxRate" label="税率(%)"></el-table-column>
          <el-table-column prop="costWithoutTaxUnitAmt" label="未税采购价"></el-table-column>
          <el-table-column prop="minOrderQuantity" label="起订量"></el-table-column>
          <el-table-column prop="maxOrderQuantity" label="限定量"></el-table-column>
          <el-table-column prop="newSettlementPartyType" label="运输方式"></el-table-column>
          <el-table-column prop="isIncludingDeliveryFeeText" label="是否含运费"></el-table-column>
          <el-table-column prop="newCostWithTaxUnitAmts" label="(原)含税采购价"></el-table-column>
          <el-table-column prop="costTaxRate" label="(原)税率(%)"></el-table-column>
          <el-table-column prop="s" label="(原)未税采购价"></el-table-column>
          <el-table-column prop="startNum" label="(原)起订量"></el-table-column>
          <el-table-column prop="endNumber" label="(原)限定量"></el-table-column>
          <el-table-column prop="type" label="(原)运输方式"></el-table-column>
          <el-table-column prop="isCon" label="(原)是否含运费"></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align:right">
        <el-button @click="saveAdjust">保存</el-button>
        <el-button @click="subAdjust">提交</el-button>
        <el-button @click="returnAdjust">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import PopupTreeInput from "@/components/PopupTreeInput";
import CyTable from "@/views/Core/CyTable";
import KtButton from "@/views/Core/KtButton";
import TableColumnFilterDialog from "@/views/Core/TableColumnFilterDialog";
import { format } from "@/utils/datetime";
import { exportExcel } from "@/utils/excel";
export default {
  components: {
    PopupTreeInput,
    CyTable,
    KtButton,
    TableColumnFilterDialog
  },
  data() {
    return {
      //编辑弹框
      adjustTable: [
        {
          contractCode: "HT1911280009441692",
          supplierCode: "1911280009438561",
          supplierName: "对账单供应商",
          storeCode: "",
          storeName: "",
          mpCode: "1911290007058031",
          mpBarcode: "",
          mpName: "对账组合商品（人民币）",
          mpBrandCode: "",
          mpMeasurementUnit: "件",
          mpPurchaseUnit: "件",
          mpPurchaseUnitRate: "1.00",
          currencyCode: "CNY",
          newCostWithTaxUnitAmt: "49",
          newCostTaxRate: "",
          costWithoutTaxUnitAmt: "12.36",
          minOrderQuantity: "",
          maxOrderQuantity: "43.609826",
          newSettlementPartyType: "公路",
          isIncludingDeliveryFeeText: "13%",
          newCostWithTaxUnitAmts: "",
          costWithoutTaxUnitAmts: "0",
          startNum: "43.362832",
          endNumber: "线上店铺",
          type: " 公路",
          isCon: ""
        }
      ],
      //商家弹窗表格内容
      tableData: [
        {
          number: "300001",
          name: "王小虎",
          type: "张小二服饰"
        },
        {
          number: "300002",
          name: "录屏商家",
          type: "入驻商家"
        },
        {
          number: "300003",
          name: "测试商家",
          type: "自营商家"
        },
        {
          number: "300004",
          name: "育学园",
          type: "入驻商家"
        }
      ],
      //店铺弹窗表格内容
      tableData1: [
        {
          name: "张小二服饰",
          number: "jd_001",
          storename: "京东店",
          storetype: "线上店铺"
        },
        {
          name: "张小二服饰",
          number: "tm_001",
          storename: "张小二的二号店",
          storetype: "线上店铺"
        },
        {
          name: "张小二服饰",
          number: "jd_002",
          storename: "育学园天猫旗舰店",
          storetype: "线上店铺"
        },
        {
          name: "张小二服饰",
          number: "tm_002",
          storename: "张小二的bbc店铺",
          storetype: "线上店铺"
        }
      ],

      //供应商表格内容
      tableData2: [
        {
          number: "jd_001",
          name: "张小二服饰"
        },
        {
          number: "jd_002",
          name: "小杨服饰"
        },
        {
          number: "jd_003",
          name: "童颜无忌"
        },
        {
          number: "tm_004",
          name: "爱尚"
        }
      ],

      size: "small",
      activeNames: "0",
      filters: {
        operating: "",
        singleNumber: "",
        shopname: "",
        moneyType: "",
        status: "",
        reviewDate: "",
        create_time: "",
        creator: "",

        res: {
          total: 1,
          code: "0000",
          rows: [
            {
              operating: "",
              singleNumber: "TJ1912270004769657",
              shopname: " 张小二服饰",
              moneyType: " CNY",
              status: " 待提交",
              reviewDate: " 2019-12-27	",
              create_time: " 2019-12-25 20:54:54",
              creator: " merchant"
            }
          ]
        }
      },
      the_products: "",
      columns: [],
      filterColumns: [],
      pageRequest: { pageNum: 1, pageSize: 10 },
      pageResult: {},
      options: {},
      showAdjustModel: false,
      showAdjustTable: true,
      showModel: false,
      showTable: false,
      showModel1: false,
      showTable1: false,
      showModel2: false,
      showTable2: false,
      checkpages: false,
      operation: false, // true:新增, false:编辑
      dialogVisible: false, // 新增编辑界面是否显示
      editLoading: false,

      // 新增编辑界面数据
      dataForm: {
        shop_id: "",
        money: "",
        full_money: "",
        full_nums: "",
        starttime: "",
        endtime: " "
      },
      selections: []
    };
  },
  methods: {
    //商家table
    showShop() {
      this.showModel = true;
      this.showTable = true;
    },
    //店铺table
    showStore() {
      this.showModel1 = true;
      this.showTable1 = true;
    },
    showSupplier() {
      this.showModel2 = true;
      this.showTable2 = true;
    },

    selectionChange: function(data) {
      this.selections = data.selections;
    },
    // 获取分页数据
    findPage: function(data) {
      this.$refs.CyTable.findPageStaticState(this.filters);
    },

    // 批量删除
    handleDelete: function(data) {
      var ids = "";
      for (var i = 0; i < data.params.length; i++) {
        ids = ids + data.params[i].id + ",";
      }
      data.params.t = "marketCoupons";
      data.params.ids = ids;
      this.utils.request.deleteUserInfo(data.params, data.callback);
    },

    // 显示新增界面
    handleAdd: function() {
      this.dialogVisible = true;
      this.operation = true;
      this.dataForm = {};
      console.log(dataForm);
    },
    //列表下载
    downloadExcel() {
      this.$confirm("确定下载列表文件?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          let filename = "优惠卷配置";
          this.$refs.CyTable.exportData(
            this.filters,
            this.filterColumns,
            filename
          );
        })
        .catch(() => {});
    },
    // 显示编辑界面
    handleEdit: function(params) {
      console.log(params);
      this.dialogVisible = true;
      this.operation = false;
      this.dataForm = Object.assign({}, params.row);
    },

    // 编辑
    submitForm: function() {
      this.$refs.dataForm.validate(valid => {
        if (valid) {
          this.$confirm("确认提交吗？", "提示", {}).then(() => {
            this.editLoading = true;
            let params = Object.assign({}, this.dataForm);
            params.t = "marketCoupons";
            this.utils.request.saveMarketCoupon(params, this.saveSeckillBack);
          });
        }
      });
    },

    // 新增修改回调
    saveSeckillBack: function(data) {
      if (data.code == "0000") {
        this.$message({ message: "操作成功", type: "success" });
        this.dialogVisible = false;
        this.$refs["dataForm"].resetFields();
      } else {
        this.$message({ message: "操作失败, " + data.msg, type: "error" });
      }
      this.findPage({ t: "marketCoupons" });
      this.dialogVisible = false;
      this.operation = false;
      this.editLoading = false;
    },
    // 时间格式化
    dateFormat: function(row, column, cellValue, index) {
      return format(row[column.property]);
    },
    // 处理表格列过滤显示
    displayFilterColumnsDialog: function() {
      this.$refs.tableColumnFilterDialog.setDialogVisible(true);
    },
    // 处理表格列过滤显示
    handleFilterColumns: function(data) {
      this.filterColumns = data.filterColumns;
      this.$refs.tableColumnFilterDialog.setDialogVisible(false);
    },
    // 处理表格列过滤显示
    initColumns: function() {
      this.columns = [
        { prop: "operating", label: "操作", formatter: this.operate },
        { prop: "singleNumber", label: "单号", formatter: this.numberJust },
        { prop: "shopname", label: "商家名称" },
        { prop: "moneyType", label: "交易币别" },
        { prop: "status", label: "审核状态" },
        { prop: "reviewDate", label: "审核日期" },
        { prop: "create_time", label: "创建时间" },
        { prop: "creator", label: "创建人" }
      ];
      var temp = [];
      $.each(this.columns, function(key, val) {
        temp.push(val);
      });
      this.filterColumns = temp;
    },
    resetForm(formName) {
      this.filters = {
        name: "",
        code: "",
        types: "",
        sortno: ""
      };
      this.findPage({ t: "marketCoupons" });
    },
    // 所属商品分类
    queryProType() {
      var that = this;
      this.utils.request.queryUserList({ t: "shop" }, function(data) {
        that.options = data.data;
      });
    },

    //导出按钮
    exInfo: function() {
      this.$message({ message: "导出成功", type: "success" });
    },
    //取消按钮
    cancels: function() {
      this.showModel = false;
      this.showTable = false;
    },
    cancels2: function() {
      this.showModel1 = false;
      this.showTable1 = false;
    },
    cancels3: function() {
      this.showModel2 = false;
      this.showTable2 = false;
    },
    cancel: function() {
      this.selections[0].id = " ";
      var this_ = this;
      this_.checkpages = false;
      this_.findPage();
    },

    //编辑框按钮
    returnAdjust() {
      this.showAdjustModel = false;
      this.showAdjustTable = false;
    },
    subAdjust() {
      this.$message({ message: "提交成功", type: "success" });
    },
    saveAdjust() {
      this.$message({ message: "保存成功", type: "success" });
    },
    removeTable(){
      this.$message({ message: "删除成功", type: "success" });
    }
    ,

    //操作列
    operate(row, column, cellValue, index) {
      return (
        '<button type="button" class="test"> ' +
        "编辑" +
        "</button>" +
        "&nbsp;" +
        '<button type="button" class="submit"> ' +
        "提交" +
        "</button>" +
        "&nbsp;" +
        '<button type="button" class="cancel"> ' +
        "取消" +
        "</button>"
      );
    },

    numberJust(row, column, cellValue, index) {
      return (
        '<span  @click = "orderDetail" class="just">' +
        '<font color="blue">' +
        cellValue +
        "</font>" +
        "</span>"
      );
    },
    addJust() {
      this.$router.push("/NewContractList");
    }
  },
  watch: {
    activeNames(val) {
      this.$router.push(`${this.$route.path}?tab=${val}`);
    }
  },
  created() {
    // init the default selected tab
    const tab = this.$route.query.tab;
    if (tab) {
      this.activeNames = tab;
    }
  },

  mounted() {
    this.initColumns();
    this.queryProType();
    $(document).on(
      "click",
      ".test",
      function(e) {
        this.showAdjustModel = true;
        this.showAdjustTable = true;
      }.bind(this)
    );
    $(document).on(
      "click",
      ".submit",
      function(e) {
        this.$message({ message: "提交成功", type: "success" });
      }.bind(this)
    );
    $(document).on(
      "click",
      ".cancel",
      function(e) {
        this.$message({ message: "取消成功", type: "success" });
      }.bind(this)
    );
    $(document).on(
      "click",
      ".del",
      function(e) {
        this.$message({ message: "删除成功", type: "success" });
      }.bind(this)
    );
    //单号跳转
    $(document).on(
      "click",
      ".just",
      function(e) {
        this.showAdjustModel = true;
        this.showAdjustTable = true;
      }.bind(this)
    );
  }
};
</script>

<style scoped>
/deep/.test {
  color: blue;
}
/deep/.submit {
  color: red;
}
/deep/.cancel {
  color: yellow;
}
/deep/.del {
  color: grey;
}
/deep/.just {
  color: blue;
}
</style>